/**
 * 
 */
package com.swim.swimteach.entity;

import org.hibernate.validator.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 游泳教学Entity
 * @author 刘军武
 * @version 2021-05-17
 */
@Table(name="t_swim_teach", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="title", attrName="title", label="标题", queryType=QueryType.LIKE),
		@Column(name="type", attrName="type", label="分类", queryType=QueryType.EQ),
		@Column(name="digest", attrName="digest", label="摘要"),
		@Column(name="content", attrName="content", label="内容"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class SwimTeach extends DataEntity<SwimTeach> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// 标题
	private String type;		// 分类
	private String digest;		// 摘要
	private String content;		// 内容
	
	//################## 附加字段 #######################
	private String swimTeachImageUrl;	// 游泳教学封面图片url
	
	public SwimTeach() {
		this(null);
	}

	public SwimTeach(String id){
		super(id);
	}
	
	public String getSwimTeachImageUrl() {
		return swimTeachImageUrl;
	}

	public void setSwimTeachImageUrl(String swimTeachImageUrl) {
		this.swimTeachImageUrl = swimTeachImageUrl;
	}

	@NotBlank(message="标题不能为空")
	@Length(min=0, max=50, message="标题长度不能超过 50 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=300, message="摘要长度不能超过 300 个字符")
	public String getDigest() {
		return digest;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}